package com.three.Service.ServiceImpl;

import com.three.Mapper.UserMapper;
import com.three.Pojo.User;
import com.three.Service.IUserService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.UUID;

@Service
public class UserServiceImpl implements IUserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User selUser(String username, String password) {
        return userMapper.seluser(username,password);
    }

    @Override
    public void AddUser(User user) {
        user.setUserkey(UUID.randomUUID().toString());
        userMapper.AddUser(user);
    }
}
